surface->hicon_small = NULL;
}
- g_free (surface->decorations);
-
if (surface->cache_surface)
{
cairo_surface_destroy (surface->cache_surface);
*decoration = 0;
if (!GDK_IS_TOPLEVEL (window))
- {
- return FALSE;
- }
+ return FALSE;
+
+ /* we want to apply the "no decorations", if decorations are disabled */
+ if (!GDK_WIN32_SURFACE (window)->decorate_all)
+ return TRUE;
if ((impl->hint_flags & GDK_HINT_MIN_SIZE) &&
(impl->hint_flags & GDK_HINT_MAX_SIZE) &&
* even though GdkWMDecoration docs indicate that 0 does NOT mean
* "no decorations".
*/
- if (impl->decorations &&
- *impl->decorations == 0)
+ if (!impl->decorate_all)
return TRUE;
if (GDK_SURFACE_HWND (window) == 0)
if (get_effective_window_decorations (window, &decorations))
{
all = (decorations & GDK_DECOR_ALL);
+
/* Keep this in sync with the test in _gdk_win32_surface_lacks_wm_decorations() */
update_single_bit (&new_style, all, decorations & GDK_DECOR_BORDER, WS_BORDER);
update_single_bit (&new_style, all, decorations & GDK_DECOR_RESIZEH, WS_THICKFRAME);
break;
case LAST_PROP + GDK_TOPLEVEL_PROP_DECORATED:
+ GDK_WIN32_SURFACE (surface)->decorate_all = g_value_get_boolean (value);
_gdk_win32_surface_update_style_bits (surface);
g_object_notify_by_pspec (G_OBJECT (surface), pspec);
break;
break;
case LAST_PROP + GDK_TOPLEVEL_PROP_DECORATED:
- {
- GdkWMDecoration decorations = GDK_DECOR_ALL;
- g_value_set_boolean (value, get_effective_window_decorations (surface, &decorations));
- }
+ g_value_set_boolean (value, GDK_WIN32_SURFACE (surface)->decorate_all);
break;
case LAST_PROP + GDK_TOPLEVEL_PROP_DELETABLE:
/* Also remember the same position, but in absolute form. */
GdkRectangle *snap_stash_int;
- /* Decorations set by gdk_surface_set_decorations() or NULL if unset */
- GdkWMDecoration* decorations;
+ /* Enable all decorations? */
+ gboolean decorate_all;
/* No. of windows to force layered windows off */
guint suppress_layered;